#! /usr/bin/python
def binomial(n, k):
  nt = 1
  for t in range(min(k, n-k)):
    nt = nt*(n-t)//(t+1)
  return nt

limit, maxn, c = 1e6, 100, 0
 
for n in range(23, maxn+1):
  for r in range(2, n/2+1):
    if binomial(n, r) > limit:
      c += n + 1 - 2*r
      break
print "Answer to PE53 = ", c
